<template>
  <div id="app">
    <el-menu :default-active="this.$route.path" router mode="horizontal">
      <el-menu-item v-for="(item,i) in navList" :key="i" :index="item.name">
        {{ item.navItem }}
      </el-menu-item>
    </el-menu>
    <router-view></router-view>
  </div>
</template>

<script>
import MyStock from "./components/stock.vue"

export default {
  name: 'App',
  data() {
    return {
      navList: [
        { name: "/", navItem: "首页" },
        { name: "/stockquery", navItem: "查询股票"},
        { name: "/predict", navItem: "预测收盘价" },
        { name: "/sentiment", navItem: "金融舆情" }
      ],
    };
  },
  components: {
    // eslint-disable-next-line vue/no-unused-components
    MyStock
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>